cmake_minimum_required(VERSION 3.8)
project(test_one_service_multi_func)

if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
  add_compile_options(-Wall -Wextra -Wpedantic)
endif()

# find dependencies
find_package(ament_cmake REQUIRED)
find_package(rclcpp REQUIRED)
find_package(rosidl_default_generators REQUIRED)

file(GOB_RECURSE ros_interface_files 
     RELATIVE ${CMAKE_CURENT_SOURCE_DIR}
     "msg/*.msg"
     "srv/*.srv"
     "action/*.action")
rosidl_generate_interfaces(${PROJECT_NAME} ${ros_interface_files})
rosidl_get_typesupport_target(cpp_typesupport_target ${PROJECT_NAME} "rosidl_typesupport_cpp")

add_executable(test_one_service_multi_func_exc src/main.cpp)
ament_target_dependencies(test_one_service_multi_func_exc rclcpp)
install(TARGET 
  test_one_service_multi_func_exc
  DESTINATION lib/${PROJECT_NAME})
target_link_libraries(test_one_service_multi_func_exc ${cpp_typesupport_target})

ament_package()
